<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <button class="btn">点击</button>
    <div class="result"></div>
    <script src="../2020、4、30、晚间作业/jquery-1.12.4.min.js"></script>
    <script>
        $(function() {
            $(".btn").click(function() {
                //ajax语法
                $.ajax({
                    url: 'http://www.liulongbin.top:3006/api/getbooks',
                    success: function(res) {
                        console.log(res)
                        $(".result").html(res.msg)
                    }
                })
            })
        })
    </script>
</body>

</html>